package com.tjbklx1.redis.test1;

import org.junit.Test;

public class RedisTest {
	
	
//	public static void main(String[] args){
//		String blackList = "blackList";
//		sadd(blackList,"ca458f06-d69d-4e74-86de-50b2d3b567bf");
//		System.out.println(sismember(blackList, "ca458f06-d69d-4e74-86de-50b2d3b567bf"));
//		srem(blackList,"ca458f06-d69d-4e74-86de-50b2d3b567bf");
//		System.out.println(sismember(blackList, "ca458f06-d69d-4e74-86de-50b2d3b567bf"));
		
		
		
//		String sortedSetName = "RjxRank";
//		sortedSetAdd(sortedSetName,1,"ca458f06-d69d-4e74-86de-50b2d3b567bf");
//		System.out.println(getRang(sortedSetName,"0L"));
//		sortedSetAdd(sortedSetName,100000,"0L");
//		System.out.println(getRang(sortedSetName,"0L"));
//		sortedSetRemove(sortedSetName,"0L");
//		System.out.println(getRang(sortedSetName,"0L"));
//		Set<String> set = sortedRang(sortedSetName,0L,100L);
//		Iterator<String> it = set.iterator();
//		while(it.hasNext()){
//			System.out.println(it.next());
//		}
//	}
	
	@Test
	public void get(){
		RedisApi.set("abc", "Hello China");
		System.out.println(RedisApi.get("abc"));
	}
	
	@Test
	public void incr(){
		RedisApi.incr("count");
		System.out.println(RedisApi.get("count"));
		RedisApi.incr("count");
		System.out.println(RedisApi.get("count"));
	}
	
	
	
}
